package com.ugoodtech.mdcc.web.service;

/* Copyright (C) Ugoodtech, Inc - All Rights Reserved.
 * Unauthorized copying of this file, via any medium is strictly prohibited.
 * Proprietary and confidential.
 * Written by Stone Shaw.
 */

import com.ugoodtech.mdcc.core.domain.*;
import io.swagger.annotations.ApiParam;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface QuestionService {

    Page<Question> queryQuestion(Long groupId,
                                       Pageable pageable);
    
    Question createTextQuestion(
            @ApiParam("章节id")  Long sectionId,
            @ApiParam("分组id")  Long groupId,
            @ApiParam("是否必填")  boolean require,
            @ApiParam("标题")  String title,
            @ApiParam("备注信息")  String desc);

    Question createTextPhotoQuestion(
            @ApiParam("章节id")  Long sectionId,
            @ApiParam("分组id")  Long groupId,
            @ApiParam("是否必填")  boolean require,
            @ApiParam("标题")  String title,
            @ApiParam("备注信息")  String desc);


    Question createChooseQuestion(
            @ApiParam("章节id")  Long sectionId,
            @ApiParam("分组id")  Long groupId,
            @ApiParam("多选/单选")  boolean multiChoose,
            @ApiParam("标准答案")  String standardAnswer,
            @ApiParam("是否必填")  boolean require,
            @ApiParam("标题")  String title,
            @ApiParam("备注信息")  String desc);


    List<QuestionSection> getQuestionSections(QuestionPaper.QuestionPaperCategory category);

    List<QuestionGroup> getQuestions(Long sectionId);

    List<Question> getQuestionsByGroup(Long groupId);

    List<QuestionAnswerOption> getOptionsByGroup(Long questionId);
}
